﻿<?php
	
	if( isset($_POST["name"]) )
	{
		$name = $_POST["name"];
		
		include ("../DB/Connect.php");
		
		$query = "select count(*) as total from userInfo where name = '$name'";
		if( !$db -> getData($query) )
			die($db -> error);
		
		$res = $db -> res;
		$total = $res[0]["total"];
		
		if( $total > 0 )
			echo "has";
		else
			echo "ok" ;
		
		$db -> close();
	}
	else
	{
		echo "kidding";
	}
?>